package main

import (
	"crypto/sha256"
	"fmt"
)

func main() {
	mystr := "sha256 yincheng QQ77025077"
	mysha256 := sha256.New()                                           //创建加密算法对象
	mysha256.Write([]byte(mystr))                                      //加入要处理散列计算
	result := mysha256.Sum([]byte("292bf3c832cce2ab5d4f9775596b13bd")) //结果结算
	fmt.Printf("result sha256 ; %x \n", result)
	//32393262663363383332636365326162356434663937373535393662313362646a3eeba2307d54506d8c84a7b2a49789ebe9e91dd1d7de655cbe91a873f6c23e
}
